Skip to content

Refactor fee_strategy module of parkinglot python solution#209

Open
amrit-sinha wants to merge 1 commit into
ashishps1:mainfrom
amrit-sinha:change-feestrategy
Open

Refactor fee_strategy module of parkinglot python solution#209
amrit-sinha wants to merge 1 commit into
ashishps1:mainfrom
amrit-sinha:change-feestrategy

Conversation

@amrit-sinha
Copy link
Copy Markdown

Previously:

  • In fee_strategy, both concrete implementations of calculate_fee duplicated the logic for computing parking duration and billable hours.

Refactor:

  • Added an abstract get_hourly_rate method to the base FeeStrategy class.
  • Moved the common fee-calculation flow into the base class, leaving only the hourly-rate lookup to the subclasses via get_hourly_rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant